<!DOCTYPE html>
<html  xmlns="http://www.w3.org/1999/xhtml"
       xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <script th:src="@{static/js/vue.js}"></script>
    <script th:src="@{static/js/elementUI.js}"></script>
    <script th:src="@{static/js/axios.js}"></script>
    <link th:href="@{static/css/elementUI.css}" rel="stylesheet" />
    <style>
        body{
            background-image: url("static/img/back.jpg");
            background-size: 100%,100%;
        }
    </style>
</head>
<body>
<div style="line-height: 50px;font-size: 30px;color: white">
    <i class="el-icon-help" style="font-size: 40px"></i>蜗牛金服后台管理系统
</div>
<el-row>
    <el-col :span="24"><div id="app" style="margin-top: 460px;height: 200px;width:100%;background-color: rgba(255,255,255,0.6);">
        <div style="margin-left: 700px">
            <el-form :inline="true" :model="formInline" class="demo-form-inline" >
                <el-form-item >
                    <el-input prefix-icon="el-icon-user-solid" v-model="formInline.loginName" placeholder="请输入登录名" style="margin-top: 70px"></el-input>
                </el-form-item>
                <el-form-item >
                    <el-input type="password" prefix-icon="el-icon-key" v-model="formInline.password" placeholder="请输入密码" style="margin-top: 70px"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="onSubmit" style="margin-top: 70px"><i class="el-icon-thumb"></i>登录</el-button>
                </el-form-item>
            </el-form>
        </div>
    </div></el-col>
</el-row>
<script th:inline="javascript">
    new Vue({
        el:'#app',
        data:{
            formInline:{
                loginName:'',
                password:''
            }
        },
        methods:{
            onSubmit(){
                axios.get([[@{systemmag/login}]],{
                    params:{
                        loginName:this.formInline.loginName,
                        password:this.formInline.password
                    }
                }).then(res => {
                    window.location.href = [[@{main}]];
                })
            }
        }
    })
</script>
</body>
</html>